package hibernate.p;

import java.util.*;

public class DocType {
	
	private String name;
	private String note;
	
	private DocType(String a,String b){
		name=a;
		note=b;
	}
	
	private static Map<String,DocType> pool;
	
	static{
		pool=new TreeMap();
		DocType.create("ID_CARD", "SYSTEM_DEFAULT_1");
	}
	
	public static void create(String name,String note){
		pool.put(name,new DocType(name,note));
	}
	
	public static DocType get(String name){
		return pool.get(name);
	}
	
	public static void delete(String name){
		pool.remove(name);
	}
	
	public String toString(){
		return name;
	}
	
	public void setNote(String note){this.note=note;}
	
	public String getNote(){return note;}
}
